import request from '@/utils/request'

export function getCompanyList(query) {
  if(query != undefined){
    query = JSON.parse(JSON.stringify(query))
  }
  return request({
    url: '/knowledge/mechanism/getList',
    method: 'post',
    data: query
  })
}

export function getCompanyDetail(id) {
  return request({
    url: '/knowledge/mechanism/getDetail',
    method: 'post',
    data: id
  })
}
export function changeStatusByCompanyID(id) {
  return request({
    url: '/knowledge/mechanism/change-status',
    method: 'post',
    data: id
  })
}

export function saveCompany(formdata) {
  return request({
    url: '/knowledge/mechanism/save',
    method: 'post',
    data: formdata
  })
}

export function deleteCompanyByID(id) {
  return request({
    url: '/knowledge/mechanism/delete',
    method: 'post',
    data: id
  })
}
export function removeCompanyByID(id) {
  return request({
    url: '/knowledge/mechanism/remove',
    method: 'post',
    data: id
  })
}

export function getCompanyAvabile() {
  return request({
    url: '/knowledge/mechanism/getAvailable',
    method: 'post'
  })
}

export function resetCompanyByID(data) {
  return request({
    url: '/knowledge/mechanism/reset',
    method: 'post',
    data: data
  })
}

